import Vue from "vue";
import router from '@/router';
import store from '@/store';
import AppModal from "@/components/app-modal/app-modal.vue";

const Modal=(props:any) => {
    let component = AppModal;
    const vm = new Vue({
        router,
        store,
        render(h) {
            return h(component, { props });
        }
    }).$mount();
    document.body.appendChild(vm.$el);
    const comp:any = vm.$children[0];
    return comp;
}

export default Modal;